<template>
  <div class="error-page">
    <div class="error-content">
      <div class="error-code">404</div>
      <div class="error-title">页面不存在</div>
      <div class="error-desc">抱歉，您访问的页面不存在</div>
      <AButton type="primary" size="large" @click="goHome">
        返回首页
      </AButton>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style lang="scss" scoped>
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 400px;

  .error-content {
    text-align: center;

    .error-code {
      font-size: 120px;
      font-weight: bold;
      color: #1890ff;
      line-height: 1;
      margin-bottom: 24px;
    }

    .error-title {
      font-size: 32px;
      font-weight: 500;
      color: #333;
      margin-bottom: 16px;
    }

    .error-desc {
      font-size: 16px;
      color: #666;
      margin-bottom: 32px;
    }
  }
}
</style>
